//
//  SpecialCollectionViewCell.m
//  Youhuiju
//
//  Created by yutenys on 16/7/21.
//  Copyright © 2016年 yutenys. All rights reserved.
//

#import "SpecialCollectionViewCell.h"
#import <UIImageView+WebCache.h>
@interface SpecialCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *pricelLabel;
@property (weak, nonatomic) IBOutlet UIImageView *goodImg;

//适配
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *goodsImgWidth;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *goodsImgHeight;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *goodsImgtrailing;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *goodsImgBottom;

@end

@implementation SpecialCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.goodsImgtrailing.constant = 15 * FitW;
    self.goodsImgWidth.constant = 73 * FitW;
    self.goodsImgHeight.constant = 96 * FitH;
    self.goodsImgBottom.constant = 6 * FitH;
    
    self.titleLabel.font = [UIFont systemFontOfSize:13 * FitH];
    self.pricelLabel.font = [UIFont systemFontOfSize:10 * FitH];
    
//    self.goodImg.image = LoadImage(@"meizhuangZW");
}

-(void)setGoodModel:(GoodModel *)goodModel
{
    [self.goodImg sd_setImageWithURL:[NSURL URLWithString:goodModel.good_coverImg] placeholderImage:LoadImage(@"meizhuangZW")];
//    self.goodImg.image = LoadImage(@"meizhuangZW");
    self.titleLabel.text = goodModel.good_name;
    self.pricelLabel.text = [NSString stringWithFormat:@"%@",goodModel.good_price_onSale];
}

@end
